import {h} from "vue";
import {NTag} from "naive-ui";

export const columns = [
  {
    title: 'ID',
    key: 'id',
    width: 180,
  },
  {
    title: '管理员',
    key: 'username',
  },
  {
    title: '状态',
    key: 'status',
    render(row) {
      return h(
        NTag,
        {
          type: row.status ? 'success' : 'error',
        },
        {
          default: () => (row.status ? '启用' : '禁用'),
        }
      );
    },
  },
  {
    title: '创建人',
    key: 'createBy',
  },
  {
    title: '创建时间',
    key: 'createTime',
    width: 180,
  },
  {
    title: '更新人',
    key: 'updateBy',
  },
  {
    title: '更新时间',
    key: 'updateTime',
    width: 180,
  },
];
